﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace BAASearchLib
{
    public class ResultFile : ResultItem
    {
        // Contains the filesystem's information about the file.
        private FileInfo fileInfo = null;

        public ResultFile(FileInfo fileInfo)
        {
            this.fileInfo = fileInfo;

        }

        #region ResultItem Members

        public string FileName
        {
            get
            {
                return fileInfo.Name;
            }
        }

        public DateTime CreateDate
        {
            get
            {
                return fileInfo.CreationTime;
            }
        }

        public DateTime ModifiedDate
        {
            get
            {
                return fileInfo.LastWriteTime;
            }
        }

        public string Author
        {
            get
            {
                // TODO
                return "NA";
            }
        }

        public string Location
        {
            get
            {
                return fileInfo.DirectoryName;
            }
        }

        public long Size
        {
            get
            {
                return fileInfo.Length;
            }
        }

        public string FileType
        {
            get
            {
                return fileInfo.Extension;
            }
        }

        public int Icon
        {
            get
            {
                // TODO
                return 0;
            }
        }

        #endregion

   
    }
}
